function validForm() {
	if(checkRegisterName() == false){
		alert("账号请输入10以内位的英文字母和数字");
		return false;
	} else if(checkPwd() == false){
		alert("密码请输入6-10位的英文字母和数字");
		return false;
	} else if(checkRePwd() == false){
		alert("第二次密码请输入6-10位的英文字母和数字");
		return false;
	} else{
		return true;
	}
}

/*验证登录账号*/
function checkRegisterName() {
	var registerName = document.getElementById("username").value;
	var regRegisterName = /^[a-zA-Z0-9]{1,10}$/;
	if (regRegisterName.test(registerName) == false) {
		return false;
	}
	return true;
}

/*验证登录密码*/
function checkPwd(){
	var pwd = document.getElementById("password").value;
	var regPwd = /^[a-zA-Z0-9]{6,10}$/;
	if(regPwd.test(pwd) == false) {
		return false;
	}
	return true;
}

// 验证
function checkRePwd(){
	var rePwd = document.getElementById("rePassword").value;
	var regRePwd = /^[a-zA-Z0-9]{6,10}$/;
	if(regRePwd.test(rePwd) == false) {
		return false;
	}
	return true;
}
